//package com.dotflat.satistics.vo.home;
//
//import com.matt.foundation.utils.MathUtil;
//import lombok.Data;
//
//import java.util.Map;
//
//import static com.matt.foundation.function.TimeComputeFunction.TIME_NAME;
//
///**
// * *******************************
// * Created by Tim.
// * form com.matt
// * on 2018/7/25
// * *******************************
// */
//@Data
//public class DayIncomeRateVo {
//    private String timeName;
//    private double planAmount;
//    private double actualAmount;
//    private double rate;
//
//    public static DayIncomeRateVo of(Map map, double planAmount){
//        DayIncomeRateVo vo = new DayIncomeRateVo();
//        vo.setTimeName(map.get(TIME_NAME).toString());
//        vo.setPlanAmount(planAmount);
//        vo.setActualAmount(map.get("actualAmount") == null ? 0.0 : Double.valueOf(map.get("actualAmount").toString()));
//        if (planAmount < 0){
//            vo.setRate(-1);
//        }else {
//            vo.setRate(MathUtil.divide(vo.getActualAmount(), vo.getPlanAmount()));
//        }
//        return vo;
//    }
//}
